import Loan
import Date

l1, l2, l3 :: Loan
l1 = Loan 1 (1, 1, (Date 1 5 2010), (Date 1 6 2010), Empty)
l2 = Loan 2 (1, 2, (Date 2 5 2010), (Date 2 6 2010), Empty)
l3 = Loan 3 (2, 3, (Date 3 5 2010), (Date 3 6 2010), (Date 30 5 2010))
l4 = Loan 3 (2, 3, Empty, Empty, Empty)

b1 = (l1 == l2)
-- b1 = False
b2 = (l3 == l4)
-- b2 = True

{- test getters -}
i1 = getClientId l2
-- i1 = 1

i2 = getFilmId l3
-- i2 = 3

d1 = getDateLoaned l1
-- d1 = Date 1 5 2010

d2 = getDateObliged l2
-- d2 = Date 2 6 2010

d3 = getDateReturned l3
-- d3 = Date 30 5 2010

{- test setters -}
l11 = setDateLoaned l1 (Date 5 6 1990)
d11 = getDateLoaned l11
-- d11 = Date 5 6 1990

l12 = setDateObliged l1 (Date 2 2 1890)
d12 = getDateObliged l12
-- d11 = Date 2 2 1890

l13 = setDateReturned l1 (Date 5 6 1777)
d13 = getDateReturned l13
-- d11 = Date 5 6 1777
